home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / utility / uwserver.zip / uwserver.tar / server / Makefile_4.3 < prev    next >
Makefile  |  1991-01-25  |  1KB  |  52 lines

  1. #! /bin/make -f
  2. #
  3. #    uw makefile (4.3BSD)
  4. #
  5. # INCDIR names the directory where the header files are located.
  6. #
  7. # OBJECTS names all of the object files required for the server.
  8. #
  9.  
  10. INCDIR    =    ../h
  11.  
  12. OBJECTS    =    uw_clk.o uw_env.o uw_fd.o uw_ipc.o uw_main.o uw_opt.o \
  13.         uw_pcl.o uw_tty.o uw_utmp.o uw_win.o openpty.o
  14.  
  15. SOURCES    =    `echo $(OBJECTS) | sed -e 's/\\.o/\\.c/g'`
  16.  
  17. DEFINES    =    `cat ../DEFINES`
  18.  
  19. CFLAGS    =    $(DEFINES) -I$(INCDIR) -O
  20. LFLAGS    =
  21.  
  22. uw:        $(OBJECTS)
  23.     $(CC) $(LFLAGS) -o uw $(OBJECTS) $(LIBS)
  24.  
  25. lint:
  26.     lint -hbx -I$(INCDIR) $(DEFINES) $(SOURCES)
  27.  
  28. tags:
  29.     ctags $(SOURCES)
  30.  
  31. depend: 
  32.     $(CC) -M -I$(INCDIR) $(DEFINES) $(SOURCES) | \
  33.     sed -e ':loop' \
  34.         -e 's/\.\.\/[^ /]*\/\.\./../' \
  35.         -e 't loop' | \
  36.     awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
  37.         else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  38.                else rec = rec " " $$2 } } \
  39.           END { print rec } ' >> makedep
  40.     echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
  41.     echo '$$r makedep' >>eddep
  42.     echo 'w' >>eddep
  43.     cp Makefile Makefile.bak
  44.     ex - Makefile < eddep
  45.     rm eddep makedep
  46.  
  47. clean:
  48.     rm *.o
  49.  
  50. # DO NOT DELETE THIS LINE (or the following blank line) -- make depend uses it
  51.  
  52.